# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=borgmatic
pkgver=1.5.9
pkgrel=0
pkgdesc="Simple, configuration-driven backup software for servers and workstations"
url="https://torsion.org/borgmatic/"
arch="noarch !s390x !mips !mips64 !armhf" # limited by borgbackup
license="GPL-3.0-or-later"
depends="
	borgbackup
	python3
	py3-setuptools
	py3-pykwalify
	py3-requests
	py3-ruamel.yaml
	py3-colorama
	"
checkdepends="
	py3-pytest
	py3-pytest-cov
	py3-flexmock
	"
source="$pkgname-$pkgver.tar.gz::https://projects.torsion.org/witten/borgmatic/archive/$pkgver.tar.gz"
builddir="$srcdir/borgmatic"

build() {
	python3 setup.py build
}

check() {
	# omit a simple test that requires borgmatic to be available in $PATH
	pytest -k "not test_borgmatic_version_matches_news_version"
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir" --skip-build
}

sha512sums="7b6a7ceb50e237c46ed1321a31ee497e41b76be7c4eedf3fd22ea0c63ba6514b439cad5c90bab221ff39ad8a674d61ad49fd58b5109a3a2676b21122261d0f17  borgmatic-1.5.9.tar.gz"
